| Total Complexity | 1 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 4 | |||
| 5 | export class IsShippingCostAlreadyExist { |
||
| 6 | constructor( |
||
| 7 | @Inject('IShippingCostRepository') |
||
| 8 | private readonly shippingcostRepository: IShippingCostRepository |
||
| 9 | ) {} |
||
| 10 | |||
| 11 | public async isSatisfiedBy(grams: number): Promise<boolean> { |
||
| 12 | return ( |
||
| 13 | (await this.shippingcostRepository.findOneByGrams(grams)) instanceof ShippingCost |
||
| 14 | ); |
||
| 17 |